package org.example.backend.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.example.backend.entity.WaterProduct;
import org.example.backend.mapper.WaterProductMapper;
import org.example.backend.service.WaterProductService;
import org.springframework.stereotype.Service;

/**
 * 水商品服务实现类
 */
@Service
public class WaterProductServiceImpl extends ServiceImpl<WaterProductMapper, WaterProduct> implements WaterProductService {

    @Override
    public Page<WaterProduct> pageProduct(Page<WaterProduct> page, String keyword, Long brandId) {
        // 始终使用自定义的联表查询，确保品牌名称不为空
        return baseMapper.pageProduct(page, keyword, brandId);
    }
} 